<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<script type="text/javascript" src="libs/jquery-1.11.0.js"></script>
		<script type="text/javascript" src="pub/JSCommonUtil.js"></script>
		<title>基本文本表达式</title>
	</head>


	<body>
		<div id="father1">
			
		</div>
		<h2>可以使用{{# $path}} 来监听模板数据的变化</h2>
		<div id='father2'></div>
		<div>
			使用jc.th($('#father2')).data().a.b=<input type='text' id='input1'/>
			<br/>
			来改变页面显示<br/>
			<span style='color:red'>注意必须是路径，暂不支持非路径监听</span>

		</div>
		<!-- 33{{new Date|filter}}33 -->
		<!-- {{a.b}} -->
		<script type="text/javascript">
		var session={};
		$(function(){
			jc.render({a:{b:1},c:2,arr:["arr1","arr2"]},"test_textExpression_1",$('#father1'),function(){
				console.log("OK");
			})
			jc.render({a:{b:1},c:2,arr:["arr1","arr2"]},"test_textExpression_2",$('#father2'),function(){
					console.log("father2 OK");
					
					$('#input1').val(jc.th($('#father2')).data().a.b)
					$('#input1')[0].addEventListener("input",function(event){
						jc.th($('#father2')).data().a.b=event.target.value
					})
			})

		})
		</script>
	</body>
</html>